<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>
<header class="main-header" th:fragment="header">
    <!-- Logo -->
    <a href="#" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>ERP</b></span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>印刷</b>ERP</span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- User Account: style can be found in dropdown.less -->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <img th:src="@{/static/images/head-img.jpeg}" class="user-image" alt="User Image">
                        <span class="hidden-xs" th:text="${currentUser.realName}"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header">
                            <img th:src="@{/static/images/head-img.jpeg}" class="img-circle" alt="User Image">

                            <p>
                                <th:block th:if="${currentUser != null}" th:text="${currentUser.level == 0 ? '超级管理员' : (currentUser.level == 1 ? '管理员' : '成员') }"/>
                                <small th:text="'since ' + ${#dates.format(currentUser.createTime, 'YYYY-MM-dd HH:mm:ss')}"></small>
                            </p>
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div class="pull-right">
                                <a th:href="@{'/logout'}" class="btn btn-warning btn-flat">退出登录</a>
                            </div>
                        </li>
                    </ul>
                </li>
                <!-- Control Sidebar Toggle Button -->
                <li>
                    <a href="#" data-toggle="control-sidebar"></a>
                </li>
            </ul>
        </div>
    </nav>
</header>
</body>
</html>